<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
 
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Service_category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
             <select id="c-service_category_id" data-rule="required" class="form-control selectpicker" name="row[service_category_id]">
                {foreach name="allList" item="vo"}
                <option  value="{$key}" {if  $key eq $row.service_category_id} selected {/if}>{$vo.name}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
  
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Service_desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-service_desc" class="form-control" name="row[service_desc]" type="text" data-rule="required" value="{$row.service_desc|htmlentities}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('时长类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <select  id="c-service_time_type" class="form-control selectpicker" name="row[service_time_type]">
                    <option value="1" {if condition="$row.service_time_type eq 1"} selected {/if} >固定时长</option>
                    <option value="2" {if condition="$row.service_time_type eq 2"} selected {/if} >自选时长</option>
                    <option value="3" {if condition="$row.service_time_type eq 3"} selected {/if} >无时长</option>
            </select>
        </div>
    </div>

    <div class="form-group {$row.service_time_type!=1?'hide':''}">
        <label class="control-label col-xs-12 col-sm-2">{:__('服务时长')}:</label>
        <div class="col-xs-12 col-sm-8">       
            <select  id="c-service_duration" class="form-control selectpicker" name="row[service_duration]">
                    <option value="30"   {if condition="$row.service_duration eq 30"} selected {/if} >30分钟</option>
                    <option value="60"   {if condition="$row.service_duration eq 60"} selected {/if}>60分钟</option>
                    <option value="90"   {if condition="$row.service_duration eq 90"} selected {/if}>90分钟</option>
                    <option value="120"  {if condition="$row.service_duration eq 120"} selected {/if}>120分钟</option>
                    <option value="150"  {if condition="$row.service_duration eq 150"} selected {/if}>150分钟</option>
                    <option value="180"  {if condition="$row.service_duration eq 180"} selected {/if}>180分钟</option>
            </select>
        </div>
    </div>

    <div class="form-group {$row.service_time_type!=2?'hide':''}">
        <label class="control-label col-xs-12 col-sm-2">{:__('服务时长区间')}:</label>
        <div class="col-xs-12 col-sm-8">       
            <select  id="c-service_time_unit" class="form-control selectpicker" name="row[service_time_unit]">
                    <option value="30"   {if condition="$row.service_time_unit eq 30"} selected {/if} >30分钟</option>
                    <option value="60"   {if condition="$row.service_time_unit eq 60"} selected {/if}>60分钟</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_chose')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="choseList" item="vo"}
            <label for="row[is_chose]-{$key}"><input id="row[is_chose]-{$key}" name="row[is_chose]" type="radio" value="{$key}" {in name="key" value="$row.is_chose"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
        
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Bargain')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-bargain" class="form-control selectpicker" name="row[bargain]">
                {foreach name="bargainList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.bargain"} selected {/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Serviceprice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-serviceprice" class="form-control" step="0.01" name="row[serviceprice]"  data-rule="required" type="number" value="{$row.serviceprice|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Saleprice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-saleprice" class="form-control" step="0.01" name="row[saleprice]" data-rule="required" type="number" value="{$row.saleprice|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Basicnums')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-basicnums" class="form-control" name="row[basicnums]" type="number" data-rule="required;integer[+0]" value="{$row.basicnums|htmlentities}">
        </div>
    </div>
   
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('平台提成(%)')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-commission" class="form-control" name="row[commission]" type="number" step="1" data-rule="required;integer[+0]"  value="{$row.commission|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quality day')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_day" class="form-control" step="1" name="row[quality_day]" data-rule="required" type="number" value="{$row.quality_day|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">每平方价格:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lowprice" class="form-control" name="row[lowprice]" type="text" value="{$row.lowprice|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">服务城市:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-city_id" data-rule="required" data-source="xiservice/area/index"   data-params='{"custom[level]":"2"}' class="form-control selectpage" name="row[city_id]" type="text" value="{$row.city_id|htmlentities}">
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
